Merged
Conversation
https://discord.com/channels/793331351645323264/807444467140788254/1394988398187647007 Discord user Dogma reported: Hello there! I would like to provide feedback on the "conflicting gear" option in DFHack. It worked for normal military gear, such as mail shirts and gauntlets, where dwarves chose pieces belonging to other soldiers. Sadly, the same happened with waterskins, quivers, and backpacks, and the problem remains, resulting in dwarves not equipping them at all. Is there a way to add these items to the problem-fixing function? Dogma did not open an issue on GitHub. Experimentation showed that the report is correct.
This change minimizes the number of inventory items which need to be dropped in order to pick up and wear uniform items. Per the Wiki and experimentation, only item types which can have the `LAYER_SIZE` token can block uniform items. Only the five clothing types can have the `LAYER_SIZE` token. Quivers and backpacks can be blocked, but cannot block. Weapons, shields, and flasks cannot block or be blocked. And most importantly, jewelry items cannot not block uniform items (experimentally verified) so do not need to be dropped.
When removing an item from a uniform, the item id should also be removed from the `uniform.assigned_items` vector. This avoids a redundant report of "an improperly assigned item".
Verified to give identical output.
In certain cases involving the --free command-line parameter, items are moved to the ground even if they are already on the ground, in a container, or in a building. An item only needs to be moved to the ground if it is held by a unit which does not have it assigned to that units uniform after the --free processing completes.
… into uniform-unstick-fix
When the --all and --drop command-line parameters are used together, each unit's report should be separated by a blank line. Due to the print-code refactor in DFHack#1490, this separator line was moved between each unit's basic report and the unit's list of dropped items.
ab9rf
approved these changes
Sep 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--dropoption now only evaluates clothing as possible items to drop--freeoption no longer redundantly reports an improperly assigned item when that item is removed from a uniform--dropand--freeoptions now only drop items which are actually in a unit's inventory--alland--dropoptions, when used together, now print the separator line between each unit's report in the proper placeThere are notes in the commits' log messages.
I listed all of these changes as Fixes; arguably the first and second are Misc Improvements.